<template>
	<div @click.stop="onClickHandler()" style="width:100%;position: relative;"
		:class="[selected ?'m-row-selected-state ' : 'm-row-normal-state ']">
		<i class="el-icon-rank drag-widget" style="position: absolute;left: 0px;top:0px;z-index: 100;" v-show="selected"></i>
		<van-tabs>
			<van-tab title="草稿"></van-tab>
			<van-tab title="在审批"></van-tab>
			<van-tab title="完成"></van-tab>
		</van-tabs>
	</div>
</template>

<script>
	import utils from '@/utils/utils.js';
	import formDesignerUtil from '@/utils/formDesignerUtil.js';
	export default {
		name: "DesignFilterGroupComponent",
		props: [
			"componentModel"
		],
		data() {
			return {
				selected: false,
				"propertySet": [{
						"key": "ID",
						"label": "ID",
						"editor": "label"
					},
					{
						"key": "onSelectedChangeExpression",
						"label": "选择改变事件",
						"editor": "textarea"
					}, {
						"key": "dataSourceScript",
						"label": "数据源脚本",
						"editor": "textarea"
					}
				]
			}
		},
		inject: ['children'],
		mounted() {
			this.children.push(this);
		},
		beforeUnmount() {
			utils.removeArrayElement(this.children, this);
		},
		methods: {
			onClickHandler() {
				formDesignerUtil.mobileComponentClickHandler(this);
			},
			setSelected(selected) {
				this.selected = selected;
			},
			getPropertyValue(propertyKey) {
				if (propertyKey == "ID") {
					return formDesignerUtil.getComponentModelPropValue(this.componentModel,"id");
				}
				return formDesignerUtil.getComponentModelCommonValue(this.componentModel,propertyKey);
			},
			setPropertyValue(propertyKey, propertyValue) {
				formDesignerUtil.setComponentModelCommonValue(this.componentModel,propertyKey, propertyValue);
			}
		}
	}
</script>

<style>

</style>
